from torch.utils.tensorboard import SummaryWriter
import numpy as np
from PIL import Image


writer = SummaryWriter("logs")

img_path = "./dataset/train/ants/0013035.jpg"
img_PIL = Image.open(img_path)
img_array = np.array(img_PIL)

writer.add_image("test2", img_array, 1, dataformats="HWC" )

img_path2 = "./dataset/train/ants/9715481_b3cb4114ff.jpg"
img_PIL2 = Image.open(img_path2)
img_array2 = np.array(img_PIL2)
writer.add_image("test2", img_array2, 2, dataformats="HWC" )
# for i in range(100):
#     writer.add_scalar("x=y", i, i)

writer.close()